package com.wzx.data.controller;

import com.wzx.basics.baseVo.Result;
import com.wzx.basics.log.LogType;
import com.wzx.basics.log.SystemLog;
import com.wzx.basics.utils.ResultUtil;
import com.wzx.basics.utils.SecurityUtil;
import com.wzx.data.entity.Permission;
import com.wzx.data.entity.User;
import com.wzx.data.service.IPermissionService;
import com.wzx.data.service.IUserService;
import com.wzx.data.utils.NullUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * @author wzx
 */
@RestController
@Api(tags = "个人门户接口")
@RequestMapping("/wzx/myDoor")
@Transactional
public class MyDoorController {

    @Autowired
    private SecurityUtil securityUtil;

    @Autowired
    private IPermissionService iPermissionService;

    @Autowired
    private IUserService iUserService;

    @SystemLog(about = "查询个人门户菜单A", type = LogType.DATA_CENTER,doType = "MY-DOOR-01")
    @ApiOperation(value = "查询个人门户菜单A")
    @RequestMapping(value = "/getMyDoorList", method = RequestMethod.POST)
    public Result<List<MyDoorMenuClass>> getMyDoorList(){

        return  ResultUtil.success();
    }

    @SystemLog(about = "查询个人门户菜单B", type = LogType.DATA_CENTER,doType = "MY-DOOR-02")
    @ApiOperation(value = "获取个人门户菜单B")
    @RequestMapping(value = "/getMyDoorList6", method = RequestMethod.POST)
    public Result<List<MyDoorMenuClass>> getMyDoorList6(){
        return  ResultUtil.success();
    }

    @SystemLog(about = "修改个人门户菜单", type = LogType.DATA_CENTER,doType = "MY-DOOR-03")
    @ApiOperation(value = "修改个人门户菜单")
    @RequestMapping(value = "/setMyDoorList", method = RequestMethod.POST)
    public Result<Object> setMyDoorList(@RequestParam String str){
        return  ResultUtil.success();
    }

    @Data
    private class MyDoorMenuClass {
        private String name;
        private String title;
    }
}
